package coml.jiyun.hp.gjtk_e.presenter;


import java.util.ArrayList;
import coml.jiyun.hp.gjtk_e.bean.ListBean;
import coml.jiyun.hp.gjtk_e.callback.NetCallBack;
import coml.jiyun.hp.gjtk_e.model.NetMedol;
import coml.jiyun.hp.gjtk_e.view.NetView;

public class NetPersencer implements NetCallBack {
    private NetView netView;
    private NetMedol netMedol;

    public NetPersencer(NetView netView) {
        this.netView = netView;
        this.netMedol=new NetMedol();
    }

    public void getData(int count,int id){
        if (netMedol!=null){
            netMedol.getData(id,count,this);
        }
    }

    @Override
    public void onSecuss(ArrayList<ListBean.DataBean.DatasBean> data) {
        if (netView!=null){
            netView.setData(data);
        }
    }

    @Override
    public void onFail(String str) {
        if (netView!=null){
            netView.setToast(str);
        }

    }
}
